package com.yuyou.train.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.yuyou.train.gateway.filter.AccessFilter;
import com.yuyou.train.gateway.filter.ErrorFilter;
import com.yuyou.train.gateway.filter.LogFilter;

@EnableZuulProxy
@SpringBootApplication
public class TrainGatewayApplication {
	
	@Bean
	public AccessFilter accessFilter() {
	return new AccessFilter() ;
	}
	
	@Bean
	public ErrorFilter errorFilter() {
	return new ErrorFilter() ;
	}
	
	@Bean
	public LogFilter logFilter() {
	return new LogFilter() ;
	}
	
	public static void main(String[] args) {
		SpringApplication.run(TrainGatewayApplication.class, args);
	}
}
